package org.sport.repository;

import org.sport.model.entityModel.AwardtableEntity;
import org.sport.model.entityModel.UsertableEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;


@Repository
public interface AwardtableRepository extends JpaRepository<AwardtableEntity,Integer> {


    @Transactional
    @Query("select aw from AwardtableEntity aw where aw.usertableByUserId =?1")
    public AwardtableEntity findByUserId(UsertableEntity usertableEntity);
}
